package com.interagriculture.controller;

import com.interagriculture.common.PageResult;
import com.interagriculture.common.Result;
import com.interagriculture.entity.TeacherInfo;
import com.interagriculture.entity.query.TeacherInfoQuery;
import com.interagriculture.service.TeacherInfoService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (TeacherInfo)表控制层
 *
 * @author makejava
 * @since 2024-11-13 22:08:27
 */
@RestController
@RequestMapping("/teacherInfo")
public class TeacherInfoController {
    /**
     * 服务对象
     */
    @Resource
    private TeacherInfoService teacherInfoService;

    /**
     * 查询导师信息
     * @param teacherInfoQuery
     * @return
     */
   @GetMapping("/getInfo")
    public Result<PageResult> getInfo(@RequestBody(required = false) TeacherInfoQuery teacherInfoQuery){
       PageResult pageResult= teacherInfoService.findByPage(teacherInfoQuery);
       return Result.ok(pageResult);
    }
}

